<?php

include_once "Model.php";

class Tags_ extends Model {
    private $tags;
    
    public function Tags_($attr=null){ $this->table_name = TAGS_TABLE;  parent::__construct(); $this->tags = $attr; }
    
    public function add($trackid){
    	
      $this->attributes['track_id'] = $trackid;
      foreach($this->tags as $tag){
    	$this->attributes['name'] = $tag['name'];
        $this->attributes['count'] = $tag['count'];
          parent::add();
    	}
    }
}


?>
